import pygame, sys
from pygame.locals import *
from data import *
import game

def cutscene(screen, text):
    font = pygame.font.Font(filepath("fonts/font.ttf"), 16)
    black = pygame.Surface((800, 600))
    black.fill((0, 0, 0))

    while 1:
        pygame.time.wait(10)
        for e in pygame.event.get():
            if e.type == QUIT:
                sys.exit()
            if e.type == KEYDOWN:
                if e.key == K_ESCAPE:
                    sys.exit()
                if e.key in (K_SPACE, K_RETURN):
                    game.Game(screen)
       

       
        screen.fill((0, 0, 0))
        
        ren = font.render("Game Over", 1, (255, 255, 255))
        screen.blit(ren, (250, 300))
        
        ren = font.render("Press Enter to continue", 1, (255, 255, 255))
        screen.blit(ren, (200, 460))
        
        pygame.display.flip()
